<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%String path=request.getContextPath(); %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.tabfont01 {	
	font-family: "微软雅黑";
	font-size: 9px;
	color: #555555;
	text-decoration: none;
	text-align: center;
}
.font051 {font-family: "微软雅黑";
	font-size: 12px;
	color: #333333;
	text-decoration: none;
	line-height: 20px;
}
.font201 {font-family: "微软雅黑";
	font-size: 12px;
	color: #FF0000;
	text-decoration: none;
}
.button {
	font-family: "微软雅黑";
	font-size: 14px;
	height: 37px;
}
html { overflow-x: auto; overflow-y: auto; border:0;} 
*{margin:0;padding:0;font-family: "宋体", Arial, "新宋体";font-size:12px;color:#555555;list-style:none;} 
.clear{clear:both;height:0;visibility:hidden;}
a{text-decoration:none;cursor:pointer;}
a:hover{color:red;text-decoration:underline;}
a img{border:0;vertical-align:middle;}
</style>

<link href="../css/css.css" rel="stylesheet" type="text/css" />
<link href="../css/style.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="../css/jcDate.css" media="all" />
<script type="text/javascript" src="../js/xiangmu.js"></script>
<script type="text/javascript" src="../js/jquery.min.js"></script>
<script type="text/javascript" src="../js/jQuery-jcDate.js"></script>

</head>

<script type="text/javascript">
$(function(){
	$("input.jcDate").jcDate({					       
		IcoClass : "jcDateIco",
		Event : "click",
		Speed : 100,
		Left : 0,
		Top : 28,
		format : "-",
		Timeout : 100
	});
});


function doclick(){
    
	$.ajax({
    url:'<%=path%>/Ordertimecontroller/adminselremaintime',
    type:'POST',
    dataType: "json",
    data:{
       'shopid':$("#shopid").val(),
       'date':$("#date").val()
    },
     success: function(data){
    	 console.log(data);
    	 
    	 $('#showtimes').html("");
    	 
    	 var count = 0;
       for(var i=0;i<data.length;i++){
    	   count++;
    	   if(count%5 != 0){
    		   var lab = '<label style="font-size: 22px;"><input name="time" type="checkbox" value="' + data[i] + '"  />' + data[i] + ' </label>'
        	   $('#showtimes').append(lab); 
    	   }else{
    		   var lab = '<label style="font-size: 22px;"><input name="time" type="checkbox" value="' + data[i] + '"  />' + data[i] + ' </label><br>'
        	   $('#showtimes').append(lab); 
    	   }
    	   
       }
      
    } 

	});

}
</script>

<SCRIPT language=JavaScript>

function link(){
    document.getElementById("fom").action="<%=path%>/Ordertimecontroller1/dopbtimes";
   document.getElementById("fom").submit();
}


$(function (){
	$("input.jcDate").jcDate({					       
		IcoClass : "jcDateIco",
		Event : "click",
		Speed : 100,
		Left : 0,
		Top : 28,
		format : "-",
		Timeout : 100
	});
});

</SCRIPT>


<body>
<form name="fom" id="fom" method="post" action="<%=path%>/Ordertimecontroller1/dopbtimes">
<table width="100%" border="0" cellspacing="0" cellpadding="0">

  <tr>
    <td height="30"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="62" background="../images/nav04.gif">
          
		   <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
		  <tr>
			<td width="21" ><img src="../images/ico07.gif" width="20" height="18" /></td>
			<td width="300">
            <!--  <input type="text" name="textfield2" />-->
              请选择日期:<input name="date"  id="date" class="jcDate" style="width:200px;height:20px;line-height:20px;padding:4px;" />
              
              请选择店铺:      <select style="width=400px; height=300px "name="shopid" id="shopid">  
                       <option value ="1">中海环宇城店</option>  
                       <option value ="2">河西万达店</option> 
                       <option value ="3">江宁太阳城店</option>
                                   
                  </select>  
              
              <input name="Submit" type="button" class="right-button02" value="查询" onclick="doclick()"/></td>
			<!-- <td width="132" align="left"><a href="#" onclick="sousuo()">
			   <input name="Submit" type="button" class="right-button07" value="�߼�����" /></a></td>	-->
		  </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td><table id="subtree1" style="DISPLAY: " width="100%" border="0" cellspacing="0" cellpadding="0">
				
        <tr>
          <td><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">

          <!-- 	 <tr>
               <td height="20"><span class="newfont07">ѡ��<a href="#" class="right-font08" onclick="selectAll();">ȫѡ</a>-<a href="#" class="right-font08" onclick="unselectAll();">��ѡ</a></span>
	              <input name="Submit" type="button" class="right-button08" value="aa" />
	              <input name="Submit2" type="button" class="right-button08" value="�����Ŀ" onclick="link();"/></td>
          	 </tr> -->
          	 
          	 
          	 
          	 
              <tr>
              <td height="40" class="font42"><table width="100%" border="0" cellpadding="4" cellspacing="1" bgcolor="#464646" class="newfont03">

					                  <tr>
                    <td height="20" colspan="13" align="center" bgcolor="#EEEEEE"class="tablestyle_title"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 当天未预约时间显示</td>
                    </tr>
                   </table></td>
              </tr>
            </table></td>
        </tr>
      </table>
          
				</td>
              </tr>
          </table>
		
		<div id="showtimes">
		
		<!-- <label style="font-size: 22px;"><input name="time" type="checkbox" value="aaaa"  />aaaa </label> -->
		
		
		</div>
		<div id="submit1">
		<input type="submit" name="Submit" value="提交" class="button" onclick="link()"/> 
		
		</div>
		
		
		
		
</form>
</body>
</html>

